<template>
  <div id="app">
    <p>login</p>
    <button @click="login">登陆</button>
  </div>
</template>

<script>
  export default {
    name: 'index3',
    data () {
      return {

      }
    },
    methods:{
      login () {
        this.$store.commit('login',true)
        this.$router.push({
          path: '/Index',
          name: 'Index',
          params: {
            name: 'Index'
          }
        })
      }
    }
  }
</script>
